home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
exec31.arc
/
EXTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-08-25
|
598b
|
35 lines
program extest;
uses
crt,
dos,
exec;
var
i: integer;
fn: string;
par: string;
begin
putenv ('XYZ=This is a test string for the spawned process');
repeat
writeln; write ('EXEC filename,params ("." to exit): ');
readln (fn);
writeln;
if fn = '.'
then exit;
i := pos (',', fn);
if i > 0
then begin
par := copy (fn, i + 1, length (fn) - i);
fn [0] := chr (i - 1);
end
else par := '';
i := do_exec (fn, par, USE_ALL, $ffff, false);
writeln ('DO_EXEC returned ', i);
until false;
end.